import request from '@/utils/request';

// 根据条件查询预算科目主表数据
export function queryBudgetMain(data) {
    return request({
        url: '/budgetMainAccount/queryBudgetMain',
        method: 'post',
        data
    });
}

// 修改预算科目主表
export function modifyBudgetMain(data) {
    return request({
        url: '/budgetMainAccount/modifyBudgetMain',
        method: 'post',
        data
    });
}

// 新增预算科目主表
export function saveBudgetMain(data) {
    return request({
        url: '/budgetMainAccount/saveBudgetMain',
        method: 'post',
        data
    });
}

/// 根据上级科目编码查询下级科目【多级联动】
export function queryByParentAccount(parentAccount) {
    return request({
        url: `/budgetMainAccount/queryByParentAccount?parentAccount=${parentAccount}`,
        method: 'get'
    });
}

/// 删除预算科目主表
export function deleteBudgetMain(data) {
    return request({
        url: '/budgetMainAccount/deleteBudgetMain',
        method: 'post',
        data
    });
}

